package com.ruoyi.admin.controller;
import com.ruoyi.admin.service.StatisticsService;
import com.ruoyi.framework.web.controller.BaseController;
import com.ruoyi.framework.web.domain.AjaxResult;
import lombok.AllArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;
import java.util.Map;

/*
@description:统计
@ClassName StatisticsController
@author chen
@create 2025-04-07 23:56
@Version 1.0
*/
@Slf4j
@RestController
@RequestMapping("statistics")
@AllArgsConstructor
public class StatisticsController extends BaseController
{
    final StatisticsService statisticsService;

    /*
     * @==============History===============<br/>
     * @Description //   返回已完成的订单数量和金额
     * @Date 2025-4-8 0:07
     * @Author < a href="15991488967@163.com">chen</ a>
     * @return com.ruoyi.framework.web.domain.AjaxResult
     */
    @GetMapping(value = "/getPayedOrder",produces = "application/json;charset=utf-8")
    public AjaxResult getPayedOrder(@RequestParam Map<String, Object> params)
    {
        return statisticsService.getPayedOrder(params);
    }

    @GetMapping(value = "/getVisit",produces = "application/json;charset=utf-8")
    public AjaxResult getVisit(@RequestParam Map<String, Object> params)
    {
        return statisticsService.getVisit(params);
    }


    @GetMapping(value = "/getUserVisit",produces = "application/json;charset=utf-8")
    public AjaxResult getUserVisit(@RequestParam Map<String, Object> params)
    {
        return statisticsService.getUserVisit(params);
    }
}
